home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 1 / Meeting Pearls Vol 1 (1994).iso / installed_progs / linux / tools / gdb.newdiffs < prev    next >
Encoding:
Text File  |  1994-06-14  |  13.5 KB  |  365 lines

  1. diff -cr --new-file gdb-4.12/bfd/config/m68k-linux.mh gdb-4.12.new/bfd/config/m68k-linux.mh
  2. *** gdb-4.12/bfd/config/m68k-linux.mh    Wed Dec 31 19:00:00 1969
  3. --- gdb-4.12.new/bfd/config/m68k-linux.mh    Thu Mar 10 09:44:19 1994
  4. ***************
  5. *** 0 ****
  6. --- 1,2 ----
  7. + HDEFINES=-DTRAD_CORE
  8. + HDEPFILES=trad-core.o
  9. diff -cr --new-file gdb-4.12/bfd/config/m68k-unknown-linux.mt gdb-4.12.new/bfd/config/m68k-unknown-linux.mt
  10. *** gdb-4.12/bfd/config/m68k-unknown-linux.mt    Wed Dec 31 19:00:00 1969
  11. --- gdb-4.12.new/bfd/config/m68k-unknown-linux.mt    Thu Mar 10 09:14:42 1994
  12. ***************
  13. *** 0 ****
  14. --- 1,4 ----
  15. + # Target:  Motorola m68k running linux using a.out
  16. + DEFAULT_VECTOR=m68klinux_vec
  17. + SELECT_ARCHITECTURES=bfd_m68k_arch
  18. diff -cr --new-file gdb-4.12/bfd/configure.host gdb-4.12.new/bfd/configure.host
  19. *** gdb-4.12/bfd/configure.host    Thu Feb  3 11:46:47 1994
  20. --- gdb-4.12.new/bfd/configure.host    Thu Mar 10 10:28:53 1994
  21. ***************
  22. *** 61,66 ****
  23. --- 61,67 ----
  24.   m68*-cbm-sysv4*)    my_host=amix ;;
  25.   m68*-hp-hpux*)        my_host=hp300 ;;
  26.   m68*-hp-bsd*)        my_host=hp300bsd ;;
  27. + m68*-*-linux*)        my_host=m68k-linux ;;
  28.   m68*-*-lynxos*)        my_host=m68klynx ;;
  29.   m68*-motorola-sysv*)    my_host=delta68 ;;
  30.   m68*-sony-*)        my_host=news ;;
  31. diff -cr --new-file gdb-4.12/bfd/configure.in gdb-4.12.new/bfd/configure.in
  32. *** gdb-4.12/bfd/configure.in    Thu Feb  3 12:00:54 1994
  33. --- gdb-4.12.new/bfd/configure.in    Thu Mar 10 09:14:42 1994
  34. ***************
  35. *** 179,184 ****
  36. --- 179,185 ----
  37.       icoff_big_vec)        tb="$tb coff-i960.o" ;;
  38.       icoff_little_vec)        tb="$tb coff-i960.o" ;;
  39.       ieee_vec)            tb="$tb ieee.o" ;;
  40. +     m68klinux_vec)        tb="$tb m68klinux.o aout32.o stab-syms.o" ;;
  41.       m68kcoff_vec)        tb="$tb coff-m68k.o" ;;
  42.       m68kcoffun_vec)        tb="$tb coff-u68k.o coff-m68k.o" ;;
  43.       m68klynx_aout_vec)        tb="$tb m68klynx.o lynx-core.o aout32.o stab-syms.o" ;;
  44. diff -cr --new-file gdb-4.12/bfd/hosts/m68k-linux.h gdb-4.12.new/bfd/hosts/m68k-linux.h
  45. *** gdb-4.12/bfd/hosts/m68k-linux.h    Wed Dec 31 19:00:00 1969
  46. --- gdb-4.12.new/bfd/hosts/m68k-linux.h    Thu Mar 10 09:42:24 1994
  47. ***************
  48. *** 0 ****
  49. --- 1 ----
  50. + #include "hosts/i386linux.h"
  51. diff -cr --new-file gdb-4.12/bfd/m68klinux.c gdb-4.12.new/bfd/m68klinux.c
  52. *** gdb-4.12/bfd/m68klinux.c    Wed Dec 31 19:00:00 1969
  53. --- gdb-4.12.new/bfd/m68klinux.c    Thu Mar 10 09:14:42 1994
  54. ***************
  55. *** 0 ****
  56. --- 1,38 ----
  57. + /* BFD back-end for linux flavored m68k a.out binaries.
  58. +    Copyright (C) 1990, 1991 Free Software Foundation, Inc.
  59. + This file is part of BFD, the Binary File Descriptor library.
  60. + This program is free software; you can redistribute it and/or modify
  61. + it under the terms of the GNU General Public License as published by
  62. + the Free Software Foundation; either version 2 of the License, or
  63. + (at your option) any later version.
  64. + This program is distributed in the hope that it will be useful,
  65. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  66. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  67. + GNU General Public License for more details.
  68. + You should have received a copy of the GNU General Public License
  69. + along with this program; if not, write to the Free Software
  70. + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  71. + /* The reason for the text segment offset is to align things suitably
  72. +    for demand paging.  However, for unknown reason Linux's text segment
  73. +    is offset by 1024, while the true page size is 4096.  The former
  74. +    is the one we care about here.
  75. + */
  76. + #define    PAGE_SIZE    1024
  77. + #define    SEGMENT_SIZE    4096
  78. + #define TEXT_START_ADDR    0x0
  79. + #define N_SHARED_LIB(x) 0
  80. + #define ARCH 32
  81. + #define BYTES_IN_WORD 4
  82. + #include "bfd.h"
  83. + #include "sysdep.h"
  84. + #include "libbfd.h"
  85. + #include "aout/aout64.h"
  86. + #include "aout/stab_gnu.h"
  87. + #include "aout/ar.h"
  88. + #include "libaout.h"           /* BFD a.out internal data structures */
  89. + #define TARGET_IS_BIG_ENDIAN_P
  90. + #define DEFAULT_ARCH bfd_arch_m68k
  91. + #define MY(OP) CAT(m68klinux_,OP)
  92. + #define TARGETNAME "a.out-m68k-linux"
  93. + #include "aout-target.h"
  94. diff -cr --new-file gdb-4.12/bfd/targets.c gdb-4.12.new/bfd/targets.c
  95. *** gdb-4.12/bfd/targets.c    Thu Feb  3 12:00:59 1994
  96. --- gdb-4.12.new/bfd/targets.c    Thu Mar 10 09:14:43 1994
  97. ***************
  98. *** 377,382 ****
  99. --- 377,383 ----
  100.   extern bfd_target icoff_big_vec;
  101.   extern bfd_target icoff_little_vec;
  102.   extern bfd_target ieee_vec;
  103. + extern bfd_target m68klinux_vec;
  104.   extern bfd_target m68kcoff_vec;
  105.   extern bfd_target m68kcoffun_vec;
  106.   extern bfd_target m68klynx_aout_vec;
  107. diff -cr --new-file gdb-4.12/gdb/config/m68k/m68k-linux.mh gdb-4.12.new/gdb/config/m68k/m68k-linux.mh
  108. *** gdb-4.12/gdb/config/m68k/m68k-linux.mh    Wed Dec 31 19:00:00 1969
  109. --- gdb-4.12.new/gdb/config/m68k/m68k-linux.mh    Thu Mar 10 11:14:23 1994
  110. ***************
  111. *** 0 ****
  112. --- 1,5 ----
  113. + # Host: Motorola m68k running Linux
  114. + XDEPFILES= 
  115. + XM_FILE= xm-linux.h
  116. + NAT_FILE= nm-linux.h
  117. + NATDEPFILES= exec.o infptrace.o inftarg.o fork-child.o coredep.o corelow.o m68klinux-nat.o
  118. diff -cr --new-file gdb-4.12/gdb/config/m68k/m68k-linux.mt gdb-4.12.new/gdb/config/m68k/m68k-linux.mt
  119. *** gdb-4.12/gdb/config/m68k/m68k-linux.mt    Wed Dec 31 19:00:00 1969
  120. --- gdb-4.12.new/gdb/config/m68k/m68k-linux.mt    Thu Mar 10 09:14:44 1994
  121. ***************
  122. *** 0 ****
  123. --- 1,3 ----
  124. + # Target: Motorola m68k with a.out
  125. + TDEPFILES= m68k-tdep.o m68k-pinsn.o
  126. + TM_FILE= tm-linux.h
  127. diff -cr --new-file gdb-4.12/gdb/config/m68k/nm-linux.h gdb-4.12.new/gdb/config/m68k/nm-linux.h
  128. *** gdb-4.12/gdb/config/m68k/nm-linux.h    Wed Dec 31 19:00:00 1969
  129. --- gdb-4.12.new/gdb/config/m68k/nm-linux.h    Thu Mar 10 11:15:01 1994
  130. ***************
  131. *** 0 ****
  132. --- 1,31 ----
  133. + /* Native support for linux, for GDB, the GNU debugger.
  134. +    Copyright (C) 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
  135. + This file is part of GDB.
  136. + This program is free software; you can redistribute it and/or modify
  137. + it under the terms of the GNU General Public License as published by
  138. + the Free Software Foundation; either version 2 of the License, or
  139. + (at your option) any later version.
  140. + This program is distributed in the hope that it will be useful,
  141. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  142. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  143. + GNU General Public License for more details.
  144. + You should have received a copy of the GNU General Public License
  145. + along with this program; if not, write to the Free Software
  146. + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  147. + #define REGISTER_U_ADDR(addr, blockend, regno) \
  148. +     (addr) = m68k_linux_register_addr ((blockend),(regno));
  149. + extern int
  150. + m68k_linux_register_addr PARAMS ((int, int));
  151. + /* Tell gdb that we can attach and detach other processes */
  152. + #define ATTACH_DETACH
  153. + #define U_REGS_OFFSET 0
  154. + #define NO_SYS_REG_H
  155. diff -cr --new-file gdb-4.12/gdb/config/m68k/tm-linux.h gdb-4.12.new/gdb/config/m68k/tm-linux.h
  156. *** gdb-4.12/gdb/config/m68k/tm-linux.h    Wed Dec 31 19:00:00 1969
  157. --- gdb-4.12.new/gdb/config/m68k/tm-linux.h    Thu Mar 10 09:14:44 1994
  158. ***************
  159. *** 0 ****
  160. --- 1,26 ----
  161. + /* Definitions to target GDB to Linux on m680x0
  162. +    Copyright 1992, 1993 Free Software Foundation, Inc.
  163. + This file is part of GDB.
  164. + This program is free software; you can redistribute it and/or modify
  165. + it under the terms of the GNU General Public License as published by
  166. + the Free Software Foundation; either version 2 of the License, or
  167. + (at your option) any later version.
  168. + This program is distributed in the hope that it will be useful,
  169. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  170. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  171. + GNU General Public License for more details.
  172. + You should have received a copy of the GNU General Public License
  173. + along with this program; if not, write to the Free Software
  174. + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  175. + /* number of traps that happen between exec'ing the shell
  176. +  * to run an inferior, and when we finally get to
  177. +  * the inferior code.  This is 2 on most implementations.
  178. +  */
  179. + #define START_INFERIOR_TRAPS_EXPECTED 2
  180. + #include "m68k/tm-m68k.h"
  181. diff -cr --new-file gdb-4.12/gdb/config/m68k/xm-linux.h gdb-4.12.new/gdb/config/m68k/xm-linux.h
  182. *** gdb-4.12/gdb/config/m68k/xm-linux.h    Wed Dec 31 19:00:00 1969
  183. --- gdb-4.12.new/gdb/config/m68k/xm-linux.h    Thu Mar 10 09:14:45 1994
  184. ***************
  185. *** 0 ****
  186. --- 1,32 ----
  187. + /* Native support for linux, for GDB, the GNU debugger.
  188. +    Copyright (C) 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
  189. + This file is part of GDB.
  190. + This program is free software; you can redistribute it and/or modify
  191. + it under the terms of the GNU General Public License as published by
  192. + the Free Software Foundation; either version 2 of the License, or
  193. + (at your option) any later version.
  194. + This program is distributed in the hope that it will be useful,
  195. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  196. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  197. + GNU General Public License for more details.
  198. + You should have received a copy of the GNU General Public License
  199. + along with this program; if not, write to the Free Software
  200. + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  201. + #define HOST_BYTE_ORDER BIG_ENDIAN
  202. + #define HAVE_TERMIOS
  203. + /* This is the amount to subtract from u.u_ar0
  204. +    to get the offset in the core file of the register values.  */
  205. + #define KERNEL_U_ADDR 0x0
  206. + #define PSIGNAL_IN_SIGNAL_H
  207. + #define NEED_POSIX_SETPGID
  208. + /* Need R_OK etc, but USG isn't defined.  */
  209. + #include <unistd.h>
  210. diff -cr --new-file gdb-4.12/gdb/configure.in gdb-4.12.new/gdb/configure.in
  211. *** gdb-4.12/gdb/configure.in    Thu Feb  3 12:05:09 1994
  212. --- gdb-4.12.new/gdb/configure.in    Thu Mar 10 09:48:21 1994
  213. ***************
  214. *** 72,77 ****
  215. --- 72,78 ----
  216.   m68*-hp-bsd*)        gdb_host=hp300bsd ;;
  217.   m68*-hp-hpux*)        gdb_host=hp300hpux ;;
  218.   m68*-isi-*)        gdb_host=isi ;;
  219. + m68*-*-linux*)        gdb_host=m68k-linux ;;
  220.   m68*-*-lynxos*)        gdb_host=m68klynx ;;
  221.   m68*-motorola-*)    gdb_host=delta68 ;;
  222.   m68*-sony-*)        gdb_host=news ;;
  223. ***************
  224. *** 243,248 ****
  225. --- 244,250 ----
  226.   m68*-*-aout*)        gdb_target=m68k-em ;;
  227.   m68*-*-coff*)        gdb_target=m68k-em ;;
  228.   m68*-*-elf*)        gdb_target=m68k-em ;;
  229. + m68*-*-linux*)        gdb_target=m68k-linux ;;
  230.   m68*-*-lynxos*)        gdb_target=m68klynx
  231.               configdirs="${configdirs} gdbserver"
  232.               ;;
  233. diff -cr --new-file gdb-4.12/gdb/m68klinux-nat.c gdb-4.12.new/gdb/m68klinux-nat.c
  234. *** gdb-4.12/gdb/m68klinux-nat.c    Wed Dec 31 19:00:00 1969
  235. --- gdb-4.12.new/gdb/m68klinux-nat.c    Thu Mar 10 11:28:56 1994
  236. ***************
  237. *** 0 ****
  238. --- 1,80 ----
  239. + /* Motorola m68k native support for Linux
  240. +    Copyright (C) 1994 Free Software Foundation, Inc.
  241. + This file is part of GDB.
  242. + This program is free software; you can redistribute it and/or modify
  243. + it under the terms of the GNU General Public License as published by
  244. + the Free Software Foundation; either version 2 of the License, or
  245. + (at your option) any later version.
  246. + This program is distributed in the hope that it will be useful,
  247. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  248. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  249. + GNU General Public License for more details.
  250. + You should have received a copy of the GNU General Public License
  251. + along with this program; if not, write to the Free Software
  252. + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  253. + #include "defs.h"
  254. + #include "frame.h"
  255. + #include "inferior.h"
  256. + #include "language.h"
  257. + #include "gdbcore.h"
  258. + #include <sys/types.h>
  259. + #include <sys/param.h>
  260. + #include <sys/dir.h>
  261. + #include <signal.h>
  262. + #include <sys/user.h>
  263. + #include <sys/ioctl.h>
  264. + #include <fcntl.h>
  265. + #include <sys/file.h>
  266. + #include <sys/stat.h>
  267. + #ifndef NO_SYS_REG_H
  268. + #include <sys/reg.h>
  269. + #endif
  270. + #include "ieee-float.h"
  271. + #include "target.h"
  272. + /* this table must line up with REGISTER_NAMES in tm-m68k.h */
  273. + static int regmap[] = 
  274. + {
  275. +         PT_D0, PT_D1, PT_D2, PT_D3, PT_D4, PT_D5, PT_D6, PT_D7,
  276. +         PT_A0, PT_A1, PT_A2, PT_A3, PT_A4, PT_A5, PT_A6, PT_USP,
  277. +         PT_SR, PT_PC
  278. + };
  279. + /* blockend is the value of u.u_ar0, and points to the
  280. +  * place where GS is stored
  281. +  */
  282. + int
  283. + m68k_linux_register_addr (blockend, regnum)
  284. +      int blockend;
  285. +      int regnum;
  286. + {
  287. + #if 0
  288. +   /* this will be needed if fp registers are reinstated */
  289. +   /* for now, you can look at them with 'info float'
  290. +    */
  291. +   if (regnum >= FP0_REGNUM && regnum <= FP7_REGNUM) 
  292. +     {
  293. +       int ubase, fpstate;
  294. +       struct user u;
  295. +       ubase = blockend + 4 * (SS + 1) - KSTKSZ;
  296. +       fpstate = ubase + ((char *)&u.u_fpstate - (char *)&u);
  297. +       return (fpstate + 0x1c + 10 * (regnum - FP0_REGNUM));
  298. +     } 
  299. +   else
  300. + #endif
  301. +     return (blockend + 4 * regmap[regnum]);
  302. +   
  303. + }
  304. diff -cr --new-file gdb-4.12/readline/readline.c gdb-4.12.new/readline/readline.c
  305. *** gdb-4.12/readline/readline.c    Thu Feb  3 11:47:49 1994
  306. --- gdb-4.12.new/readline/readline.c    Thu Mar 10 09:14:46 1994
  307. ***************
  308. *** 57,63 ****
  309.   
  310.   /* System V machines use termio. */
  311.   #if !defined (_POSIX_VERSION)
  312. ! #  if defined (USG) || defined (hpux) || defined (Xenix) || defined (sgi) || defined (DGUX) || defined (__H3050R) || defined (__H3050RX)
  313.   #    undef NEW_TTY_DRIVER
  314.   #    define TERMIO_TTY_DRIVER
  315.   #    include <termio.h>
  316. --- 57,63 ----
  317.   
  318.   /* System V machines use termio. */
  319.   #if !defined (_POSIX_VERSION)
  320. ! #  if defined (USG) || defined (hpux) || defined (Xenix) || defined (sgi) || defined (DGUX) || defined (__H3050R) || defined (__H3050RX) || defined (linux)
  321.   #    undef NEW_TTY_DRIVER
  322.   #    define TERMIO_TTY_DRIVER
  323.   #    include <termio.h>
  324.